import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
public class Demo10 {
    public static void main(String[] args) {
        try(InputStream inputStream = new FileInputStream("./test.txt")){
            byte[] bytes = new byte[21024];
            while (true){
                int n = inputStream.read(bytes);
                if(n == -1){
                    break;
                }
                for (int i = 0; i <n ; i++) {
                    System.out.printf("%c",bytes[i]);
                }
            }
        }catch(IOException e){
            e.printStackTrace();
        }
    }
}
